Log exception on crash before restart and small logic fix

Logic fix was that to disallow clicks on form, we would check if the
click was in the rectangle of the form. This means that a click and drag
could never finished if started on the titlebar sometime.