Whoops, fixed an obvious bug in scoping