Fixed deprecated errors