Added some validations
Corrected mistypes