Maybe a bug.
on the second cycle, the hero flies out of bounds
Howdy and welcome to the forum! In the future please be sure to post your code properly formatted. You can learn how here: [Essentials] How To Post/Format Your Code Correctly
Put your ‘hero.say’ statement before the ‘while’ loop. Right now, you have it inside the loop, so he is constantly stopping to speak, which is throwing your steps out of whack.