Fixed and tested random priority assignation.