Fixed problem where program was crashing when a field was left empty. 
Java had been having a NumberFormatException. New try/catch code now
sets the field value to 0 in that case.