fix this algorithm, again (jasonshaev)
changelog