Fix bug when loading client in web browser