Fixes for #5 & #6