Forgot to add $document dependency