Detect runlevel
Bugfixes. Thank you, Hancock.
Bugfixes, part II. Thank you, Hancock.