Fixed incorrect pointer usage