fixed corner cases