Some bug fix into pis sync stuff