improved expression guard