Fixes if condition