fix 500 internal server error due to key