Fixed new category bug by moving .change and .keydown into a document.ready