Rand Bug fixed