Merge pull request #1 from jacarma/patch-1

Avoid call to $apply to improve performance