Fixing silly pointer mistakes