change: to remove goto statement for lua 5.1 compatibility.