Fixed deprecated getUnits() call (#34)