shcode and minor fix to goto