fixing tests and merge errors