Fixed ambiguous condition in trap feature