fix multiple instances in a single process