Fixed handling of resolution.