Fixed php warning
better matching + bugfix