BUG: Fixed bug in interp.py gradient finding