fix problem with empty image