fix validation in models