better handling of focus