Fixes #1385 functions_modcp - var not an array

Fixes #1385 functions_modcp - var not an array