add NCurses header location mess & fix risky code in mb_substr