avoid some unnecessary $apply() calls