fix stupid performance issues