quick fixes for some algorithms