Fixed crash on startup

Fixed crash on startup