Fix inverted immediate check