fixes for tables in mongoose