fixed recording bug