merged latest from upstream

@versae : Thanks!