Adding logic to create the Gap values from the Interval
Try to fix the decryption errors, it seems that misplaced Crypto.reset() is causing the problem. This needs some futher
analysing of that issue.