small fix
add more validation