2014-09-05: fix some bugs