small fixed bugs in some methods