index out of range bugfixes; resolution creation method