Uses JSON.parse instead of ActiveSupport::JSON.decode
Fixes to return zero when first time error