From Dev branch

Hi carl! It's been a year since my pull request. So maybe this will help you..