Fix some crashes & result setting in system functions
Fix typo in menu parsing