fix incorrect pointer initialization