Fix corner bug