Added counter options and fixed commit message.
Fixed bugs.