Few bugfixes (#7)