all works with deadlock