Fix a few issues with tests