fix incorrectly parsing class weight arguments