fixed script and added setters for vm.