fixed 'endif' in footer