Fixing bugs related to using constructor without new keyword