merged latest from upstream

@jeanphix Thank you!