Checked for errors and fixed