Some validation added.