fixes for flag handling, fixes for pacemaker checks, adding utils.functions