fixed an init bug