fix randomised generator to remove space