fixed validation problem