Various fixes to user and channel state handling.