Fix double record problem