Fixes boolean if statement