trying to fix initial load script errors – promises firing too soon