apply some touches from @cordoval. fixes #6