restart-server command only works every other time