Added a better way of ensuring focus on input control