fixed bug with  detecting the type of the constructor