Fixed a bug on initialize