tidyup and feature sync bug fix