fix for bugs