refine scope logic to pass funtional tests, also fixed #128
refine scope logic to pass funtional tests, also fixed #128

cgvarela/lightncandy,fadimko/lightncandy,zordius/lightncandy,zordius/lightncandy,Corollarium/lightncandy,jmgq/lightncandy,Southparkfan/lightncandy,cgvarela/lightncandy,jmgq/lightncandy,vein1992/lightncandy,Corollarium/lightncandy,Southparkfan/lightncandy,vein1992/lightncandy,fadimko/lightncandy