Logic on switch statements removed as it bugs without type checking