fixed stage 500 errors