Fixing location matching check