minor if else change