update with newest version & make fixes as per @aurimasv - let's see if this can be merged, else I'll issue a new pull request