Few bugfixes