Changed add_filter to handle float values