Fixing a few issues