fixes a few issues