On some variants of Hardy's inequality