Fix bug in add handlers