Added explicit state for better event handling