Fixing bug in test