Fixed a bug in PRIME_BB and fixed some spelling errors