fixed the assertion message in the 'undefined' image case