Added enclosure support (fixes #1322)

fixes #1322