Fix: Error applyint range threshold