solve problem with multiple activity instances