* Fixed wrong condition with :if/:unless block
* More robust check for min/max range in random number generation