Core update function bugfix, random number between but not function