Removed buggy UI thread work in record(...).