Fixed small, subtle threading bug in scientific mode.