Taking care of some corner cases.