more fixes for c99 bug