Matthew's fixes