Fix main thread blocking when updating the textfield, fixes #1