Fix for inline if statement evaluating true