Fixed bugs 7