Alternative shorter fixes for #24 and #26