fix afterCreate hook