Fix screenshot functionality