fixed duplicate issue (for real) + added counter