[FIX] Parsing options, doc() and collection(). Closes #905
[MIN] merge