Merge "Fix bug where dismiss() was being called from the wrong thread" into klp-dev