Fixed up corner cases