Bugs were found on last commit when map size increased to 20. resolved those bugs