Undefined variable errors when upgrading from 0.6 to 1.0