fixed bugs calling sysproc