Fixes and improvements for tables