Added init check to singleton pattern.