Don’t crash app by using deprecated methods