Changed order of check for image in boxdesignscript