Fix server js bug