some fixes for sequel support