Fixed 500 error issue