Improve synchronization and timeout handling

Make sure we can safely sync to the status packet in case
garbage is received before.