Fix bug in formatstr.write if curr_n < 0