Modular Control for Avoiding Deadlock in Batch Processes