Added inactivate slide function