Fixing javascript for VM selection: minor improvement