some bug fixing with client validation