fixed 2 bugs(in RConn.cpp & buffer.cpp)