Fixed problems introduced by previous commit