fixed all bugs with RST.hpp