Fixes according to tridge's comments