bugfix and avoiding selection