fix issue with leftover in JS, changing selected category to 1 always