improve workingArea defination, fix issue #4100 and #4099