Bug fix #9: NameError: name 'as_of' is not defined