fix to avoid 'headers already sent' error while running actions