Bug#284 Fix invalid memory read.