Fixes a few errors