some code changes to get the modem to be consistent