Fixed visibility check of selection box