src: fixed bugs