Fixing bug ignoring "which"