How to keep your hat's brim from flattening