wrong condition for "action checking"
missing bracket