Fixed optional building of SM module