Merged some changes in Tap.