fixed the bug that crashed site