Fixed minor functions