fixed bugs that i introduced again :-)