Fixed chartype conditional