Fixed a little bug in random view.