fixed corner bug