Fixed numerical problems with biascorrect.py