Fixing wrong dereferencing