Fix issue with constructor being called twice.