Added safety value for invalid inputs.