fix #1 Fixed bug with memoization cache not being cleared on input change.