Fixed issue with async Javascript loading