fixing more corner cases