Fixed errors in zone merging