Much needed fixes