bug #3351: Fix wrong method call. Thanks to Sebastiaan Smit

(cherry picked from commit b4f84e77a0a4c880cd471c334bdcf82123979be8)