added in new constrain code to fix burry images. Fixes #92