various bug fixes and tutorial adjustments