stupid bug with else if