Replaced depricated function call.