fix loader state