correct various issues with the slack formula