Further fix for bug #310 (also fixes #332)
Merge branch 'master' into phpcs-fixer