Fixed bug if all graps are empty or breaked