fixed a few bugs in the video engine in cached mode
overhaul of the engine in progress. Should make the cache engine cleaner and improve performance