Undefined wa variable bug fixed