fix port for MacOS