fix a few issues