fixed error with scope constructor