Fixed 2 small code bugs so that it would run.