fixed overwritten scope