death/state transitions and minor bug fixes