fixes for prime