Bugfixed for extended random