Fixed displaying of selection boxes, fixes #762

Tested in Chromium and Firefox