fix some special cases