if block bugfix