Fix a few issues