help algorithm #bugfix a max was too much