Fix render image bug.