Court: Sexually dangerous can be kept in prison