Added auto closer option to magnet handler