src: bugs fixed