fixed recording bugs