fixed error 500 when Authorization header was malformed