Minor changes

Made some minor bugfixes.