Fixed 'this' to work as expected