Fix bug on getUserAgent