Fixes to improve use inside model.