fix tom's errors