Added fallback stage function handling