bugfixes in validation