fixed a bug in inside initialization