Case matching bugfix