adjusted some integrity-checks