fix loader bugs