Fixed dereference bug