minor bug fixing in reveal code.