Bugfixes #6, Added #7