Fix loading order bug