trying to solve 500 error