Updated system detection (adjustments to previous commit)