Fix bitmap issue for initPT and initST. Fix error output to "err".