support size changes and check for magick number