Fixed deprectated method calls