Added changes again from bc57cf4 that somehow reversed