Fix for undefined json issues in specs.