Fixes #1: User defined metrics are successfully calculated, with no errors on Python console.