Fixed bug in AjaxForm when firing events
Fixed mysqli duplicate key insertion