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