correct issue with writing to video memory