some speed fixes