fix some errors and sync