some minor bug fixes regarding the behavior of application when tables were empty