Fixed validation on server side