fixed minor semantic issues

missing semi-colons, missing object declaration and a fix for the prevent default action