fix speed bugs