Fixed bug in erase_picture opcode
Fixed bugs in header flags code