fixed bugs in modem_new