Fixed bugs from OS reset