Judge slaps mining company with $2 million penalty