Removed usage of deprecated function