Modified client to make the logical order of actions more obvious