fix trap commands