added security check for explicit mode
removed extra empty table indexing
added tests for resave