bugfixing and sync