Tried to fix sync()