Added exception for empty size or 0 number of mines