fix button validation