fixed a deprecated function call