Some framework fixes