Fix some pointers issues