bug fix for advanced sem option, minor style changes