Fixes bug in searching for badge #