improved synchronization handling - actually compiles now