Correct various issues with the slack formula

As per @kevinSuttle's suggestions.