Fix for couple of corner cases.