fix bug where sensor would still be added after "add sensor" menu is closed