Fixed #501: Requests get redirected to wrong routes (Java)