Fixing several test cases