some improvements. But bug still exists.