fix deprecated method from 1.8.7