Fixed bug in categorisation