Added Phil's fixes