changed locking for subscripitons