Fixed a bug in allocate IP model