Modified the order of initialization to remove invalid GL context calls