fixing 500 issue