Solved deprecated function for R16 and higher