Fixes some issues that were breaking tests