Fix nullpointer exception on repository item