Fix bug in add action