Fixed more bugs when clicking on interval for custom formula