fixed broken selection after context change