Fix 400 status and add handler