Security fix. Closes #408.