OPINION
LESLIE, Judge.Warden John Wood appeals from an order entered by the district court granting Raymond A. Case, Jr.’s petition for writ of habeas corpus. We affirm.
FACTS
At the time he petitioned for habeas corpus, Raymond A. Case, Jr. was an inmate at the Minnesota Correctional Facility-Oak Park Heights (MCF-OPH). He was imprisoned as a result of a 51 month consecutive sentence for two counts of second degree assault.
On June 17, 1983, Case was released from the segregation unit at MCF-OPH after the 168 days then remaining on his segregation sentence were suspended. On that same day, however, he again violated inmate discipline rules and after refusing to hand over a pair of mirrored sunglasses and hitting a guard, he was placed back in segregation.
Case was convicted of disobeying a direct order, resisting placement, disorderly conduct, and assault. Case’s original 168-day segregation sentence was reimposed consecutive with an additional 300-day segregation sentence. The 168-day sentence expired on December 1, 1983. The 300-day segregation sentence began on December 2, 1983. o
As of the date the habeas petition was filed, Case had earned 10 months of good time. His supervised release date was November 6,1983. The expiration of his fixed sentence was September 3, 1984. Thus on January 6, 1984, the date of the hearing on the petition, Case was past his supervised release date but was facing a term of segregation which would keep him in the MCF-OPH, until his sentence expired.
Case contended, and the district court agreed, that he was entitled to release from MCF-OPH on his supervised release date. The court concluded that this result was required by Minn.Stat. § 244.04, subd. 1 (1982), which provides that good time, once earned, cannot be taken away.
The Warden appeals, contending that Case was not entitled to release on that date because Minn.Stat. § 244.04, subd. 2 (1982) provides that no inmate confined in segregation for violation of a disciplinary rule shall be placed on supervised release until discharge or released therefrom.
ISSUE
Did the trial court err by granting the prisoner’s petition for writ of habeas corpus?
ANALYSIS
The trial court determined that the prisoner was entitled to be released from prison on his supervised release date, based on Minn.Stat. § 244.04 subd. 1 (1982), which provides in part:
If an inmate violates a disciplinary offense rule promulgated by the commissioner, good time earned prior to the violation may not be taken away, but the inmate may be required to serve an appropriate portion of his term of imprisonment after the violation without earning good time.
Prison officials contend that Case was not entitled to release on his supervised release *66date because Minn.Stat. § 244.04 subd. 2 (1982) provides in part:
By May 1>, 1980, the commissioner shall promulgate rules specifying disciplinary offenses which may result in the loss of good time and the amount of good time which may be lost as a result of each disciplinary offense, including provision for restoration of good time. In no case shall an individual disciplinary offense result in the loss of more than 90 days good time; except that no inmate confined in segregation for violation of a disciplinary rule shall be placed on supervised release until discharged or released therefrom, nor shall an inmate in segregation for violation of a disciplinary rule for which he could also be prosecuted under the criminal laws earn good time while in segregation.
(Emphasis added.) According to the Warden’s interpretation, subdivision 2 creates an exception to subdivision 1, prohibiting the supervised release of any individual who is in segregation for a disciplinary violation. The application of this rule in the prisoner’s case results in revocation of earned good time. The trial court resolved the apparent conflict between the provisions by concluding subdivision 2 does not create an exception to subdivision 1.
We agree with the trial court and hold subdivision 2 does not allow revocation of earned good time. Subdivision 1 unequivocally prohibits loss of earned good time. Subdivision 2 addresses a prisoner’s ineligibility to earn good time while confined in segregation. It limits the good time which a prisoner is impeded from earning for a single disciplinary violation to 90 days. While the exception language in subdivision 2 contradicts subdivision 1 when juxtaposed, ordinarily exceptions modify only language immediately preceding it. Dahlberg v. Young, 231 Minn. 60, 42 N.W.2d 570 (1950). To avoid this contradiction we hold the exception applies only to the effect of the 90 day limitation of subdivision 2.
We are not unmindful of the Warden’s concern over potential behavior problems or rules infractions by inmates near the end of their terms of incarceration. Under our ruling, such incidents may not result in as severe inmate discipline as would result if the incidents occurred early on in the prison term. However, if the behavior constitutes criminal conduct, an inmate may be prosecuted under the criminal laws. If available remedies prove inadequate, it should be brought to the attention of the legislature.
DECISION
Prison official’s detention of inmate past his supervised release date resulted in the loss of earned good time. Therefore, inmate’s petition for writ of habeas corpus was properly granted.
Affirmed.