wrong location for if directive