Fixed issue when no query string is present