Removed df.g - not used and causing failure