bug fix for handler crashing if started through non-ui thread (hopefully)