Added changes mentioned by Dennis