Fixed #7 and #10

Fixes issue #7 (passing non-numeric values to blocks with numeric inputs) and issue #10 (clicking and dragging on buttons attached to dialogs).