Some fixes for angularjs