changed multi catch in server to two seperate catches