Fix issue with constructor scope