I don't have access to a windows setup to test this but does `scope` get defined in this function?