Fix for cases when tables are not defined