Fixed refactoring bug for singles, doubles and triples