Fix for portrait/landscape detection

Sometimes the width can be 568 or 320 depending on orientation on iPhone 5. This fixes the detection.