fixing tests and api dialog