Fixed bad api call when server is stopped