fixed a bug with context menu