Better fix for #24