Added missing close statement for prepared statement.