Tests improvements and possible fix for #79