fix #33; but still can not handle concurrent issues #34