Finally fixed that damn bug. The dug was in deleted lines - concurrent access to resources