Fix bug in standalone mode [issue 279]