fixed the "$digest already in progress" error