Fixes even more errors discovered in testing