Changed deprecated functions to comply to the previous commit