fix bug with multiple calls of initialize