Fixed the jasmine issue by modifying the vm's context