Fix for #124
Fix for 119
Fix for #128, #126, #122
Fix for #123