Upgraded a bit the resolution changing code.