fixed capturing screenshots