Fix variable dereferencing