improved mouseController
fixed condition in showSelection