resolve bug: must call at least setupterm() first.