Fix wrong pointer usage