Fixed the resized function in spatcontrol to account for dataframes.