Fixed a bug related to deferred script loading