Fix reset of attributes with ansi

reported by Christopher Ohlsson (dmnc)
Merge pull request #164 from ailin-nemui/fix-ansi-reset

Fix reset of attributes with ansi