fixing port bugs