Fixed a crash w/ JS input handlers. added mirror.js