added specialized image generation to substates and removed resize window call that seems to be exciting some race condition that causes seg faults