fixed take screenShot method