Fixed more exceptions during testing