Fix for not having 'this' in a function