Fixed wrong type issue in embedded matching