Added additional conditional to fix multipication issue in sets