fixed compatability with angular 1.2rc2