fixed bugs in tutorial