fixed table bugs and error pages