fix error 400 on api