Added more validation