added protection against repeated initialization