Fixed constructor detection issues