Something like this should handle your case and similars. Could you try it out, please? -- Pedro Alves