fixed falling through to last if