bug fix for I/O ports with dimension of zero