Add proper state handling