NX-526: Fixed some mistakes, test made to work