hlit fixed and some minor improvements

some fixes