Fixed some errors after discussion with Sean