prevent over-flow of large images