Fix first and second fixes for dkirpa

Fixes errors