Angular 1.2.3 compatibility issues

Fixed bugs after upgrade to angular 1.2.3