Fixed bug where prime numbers higher than the given range were displayed