fixed bugs - validation