fixed another buffer overflow bug