Fixes #1409. No need to use javascript here.