fixing position of legend