Added a check to check if topRegion is empty