Add attached bg variable, fix em rounding