Fixed timing issue resulting in occasional null mapdiv