Improved screenshot functionality.