Gfate intergration

Some bugfixes and OnPrompt event.