fix status command to use pid variable