Added a missing call to .promise() in viewModel.