fix crash in SOP.hpp