Bug fix / adding funct.