Detect viewport technique each time to fix #44