Fixed bug when selecting multiple boxes