Port fix.
Some fixes