[core] gc engine: option as error type and [bug] wrong variable name