Fixes some validation errors