Fixed singleton implementation.