fix beforeLoad callback (added newItems argument)