Added error checking for non-numeric values. Fixed isset errors.