Fix a bug in the API

Was deleting account every minute if they were not active...