Fixed 500 errors