Added some fixes to get the plugin working with angular