bugfixes after upgrade to angular 1.2.2