a few bugfix in adding