Fixes a few issues after merge