Fixed bug, in dj, needs more work with tests etc.