Fixed error caused by blank inputs.