Fixes #1508.

Perhaps, needs some more testing (mobile, pad, etc.).