bugfix in random and some sanify checks