minor fixes by Qi