Fix tremendous bug found thanks to comment on Marketplace