fix singleton problem