Replaced PHP start short tag with standard PHP start tag

Change two PHP start short tags (<?) to standard PHP start tag (<?php) so the plugin works on servers that don't support PHP short tags.

Also fixed two minor bugs