fix getting stuck in stone and efficiency improvements