fixed multiple initialization bug