Fixed issue with determining don't care positions