update stop platform to ensure proper shutdown