fix crash on terminal resize by handling SIGWINCH
set correct window title