Fix Javascript error in webclient