fixing corner problem