Adjusted condition checking for stage env.