added frame size checks, fixed npe when missing frame icon