small fixes in algprithm.py