Update afterRemove to be beforeRemove