AMT fixes, fixed static realm, fixed ReturnValue 2