Bug fix: Added in necessary function arguments