A few bugfixes and consistencies