fixed some recording code