fixed a bug in the status link function