Alternative solution to fix #345.