fix that and clean up state handling a little. R=rsc DELTA=44 (18 added, 8 deleted, 18 changed) OCL=28359 CL=28359