switch ProgramImage to size_t