redefine handler in allbeans.lua; refactor c# port
fix last commit