Bugfixes for Angular compatibility