fixed huge bug with prime generation