Fixed a bug in IP address assignment