minor bugfix
fixings for undefined variables