Fixed issue where angular-trackjs could throw exceptions in tests