fixed some problems on boot