Added secd->tick stat, fixed gcc warnings