500 errors fix