Fixed js bug when no status handlers are defined