Fixes if statement