Fixed invalid values raising an error.