added workaround for state->last_string assertion problem