correcting bug in hardware init of ports.