Added entity manager clear before synchronization to ensure fresh view to database.