Error checking
Flatten pres