Logged In: NO

Actual bug is this line:-

if(constructor!=null) {

Should be:-

if(managedConstructor!=null) {