Fixed an error, where something deprecated was used