fix "can't convert Fixnum into String" TypeError (issue #398)

Thanks to Guillaume Polaert for finding and reporting this.