ticket:1 fixed typo, added multiline support and overflow workaround