Fixed issue with passing "this" by reference