added small fix to prevent server from crashing on empty this.state