Duplicate function for flex modules fixed

The duplicate function for flex modules is working again.