Fixed a segfault in curses.
Fixed a bug about handling %i in bars.