fix bugs in screen-256color