stopped it from crashing when invalid information was input to save