some bugfixes. hard bugfixes haha
added a wait opcode