Properly set default port

Closes #1045