Fixed some freezes at startup