https detection works, but screenshot doesn't