fix for mutiple context query in partition creator