Partial fix for speed issues