fixed illegal read/write (as reportded by valgrind)
Authored by: heiko 2012-12-20
Parent: [r130]
Child: [r132]