fix max factor #29

fixes #29