fix some major errors