Updated code not to throw deprecated messages on it's own.