fixed a bug with picking random boxes