Changed scope variable to "vm"