Fix bucket handling