Fixed off-by-one error when trying to cast attribute to ascend

This fixes the bug described in #843
Typo fix in comments

completelty => completely
Merge pull request #844 from qnet-herwin/ascend_parse_filter

Fixed off-by-one error when trying to cast attribute to ascend