Fixed a few bugs in crisp.js