fix pref implementation of replace content