Fixed sub bug