fix broken port forwarding
Refactored some code in server settings