Fix to FOR command parsing and evaluating expressions