Fixed some bugs which snuk in.