Fix tile tests and state machine.