fixed some issues and statically linked ncurses lib