fix on first-load crash