Added bounds checks for set