Fixed deprecated issues