Added dynamic module detection
fixed merge