Small changes and bugfixes