Correct setting up detJ