Fixed a uninitialised variable error in dynamod with walls