Fixes beautification of selection.