Fixed some problems with tests