Fixes for Negative Error algorithm