fixed a bug regarding links