fixed bug where imageScript was being set to calScript