Fixes to WAL and SP engines