Fix #959, and add support of escape
Fix import