BRANCH 4.3: fixed undefined variable error