fixed multiple init bug