Fixing JS load order