Fixed tapstar and tapend bug