Fix for #2, #3