fix loader event bug