Added stuff to handle misfiring