fix for secure images and allow more image levels