Fixing getfieldtypes method