Fixed issues with constructor