Fixed bugs preventing rpm from building.