table bugs fixed