fixed problems w/ older versions of angularjs