fixed so client doesn't crash on erroneous input