Updated server code to match master
Finished un-finished if statement