Bugfix invalid-field and tests