bugfix for zero-length score