fix to work with angular 1.3 and higher
fix to work with angular 1.3 and higher