Fix unbound variable bug
Merge branch 'master' into next