Should be sync to avoid some race conditions