Fixed perl problems