fixing validateLevel