20131015 fixed tricky bug.(Done)