make ws server more safe