fixed wrong memory access?