Merge in changes from @globaldev's fork