fixing c89 issues