Small fix in advancedTap calculation