Bugfix wrong if statement in the panel template