fixed pixel copying issue
Made generation work correctly