fixed issues in memory management on failed case-processing

fixed issues in memory management on failed case-processing
fixed issue in parsing single expression (issue when symbol ":" at end of expression)