Fixed a bug in the deleteVideos function that was causing a stack overflow