Fix: Internal server error when parsing query parameters