Fixes for im-tables#53, im-tables#45, im-tables#44