Fix loading order of JS classes.