Fixed bug on function to eliminate sensors