Fixed bugs with int scope settings