Important bug fixes caused by AngularJS rewrite.