clean up serial portname code