Attemps to fix possible race condition in setArea(). #1342