fixes to generic apply