Fixed an issue when there are no null regions