fixed getting the wrong constructor