Fixed deprected function