reverted some changes to preserve C99 compat