Cleaned up length with windows port.