Little fixes and some helpers.