Exit code should be $? >> 8 instead of $?.