Fix from lavapatch