Fixed bug triggered when required plain javascript