Exception when writing MoleRatio AC Packing

I get a server error 
Server threw an exception (writing property "MoleRatio at pack.pl line ...) 
when setting MoleRatio when trying to script the AC packing function in Perl. I don't get an error when running the same settings with the software itself and there are no complaints when debugging the perl script inside Materials Studio. I need to be able to script the packing because I want to create a dataset. Does anyone know anything that may help with this?