Few minor bugfixes