Fixed security issue (issue #1987)