small fix for 500 errors.