fixed escape handling