Fixes bugs in JCL implementation