added more checks for camera returning odd frame size