Added missing initialisation of $conn