server: fixed illegal memory access, refs #746