Removed debug message + replaced deprecated method