server: fix js bug