Fixed commandAD and minor fix loadProgramIntoMemory().