fix problems with having