Fix caching issue with margins in view