Fixed returning temp pointer